﻿using System.Web.Mvc;

namespace NewsPortal.ViewEngines
{
    public class DefaultRazorEngine : RazorViewEngine
    {
        public string DeafultSkin
        {
            get
            {
                /// Pull out current skin theme in here...
                return "Green";
            }
        }

        public DefaultRazorEngine()
        {
            ViewLocationFormats = new[] 
            {
                "~/Skins/" + this.DeafultSkin + "/{1}/{0}.cshtml", "~/Skins/{1}/{0}.vbhtml",
                "~/Skins/" + this.DeafultSkin + "/Shared/{0}.cshtml", "~/Skins/Shared/{0}.vbhtml"
            };

            MasterLocationFormats = new[] 
            {
                "~/Skins/" + this.DeafultSkin + "/Shared/_Layout.cshtml"
            };

            PartialViewLocationFormats = new[] 
            {
                "~/Skins/" + this.DeafultSkin + "/{1}/{0}.cshtml", "~/Skins/{1}/{0}.vbhtml",
                "~/Skins/" + this.DeafultSkin + "/Shared/{0}.cshtml", "~/Skins/Shared/{0}.vbhtml"
            };

        }
    }
}